<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Document</title>
    <script src="/static/js/axios-1.10.0.js"></script>
</head>
<body>
    <h1>OAuth2</h1>

    <hr>
    <hr>
    <hr>
    <button onclick="doOatuh2Ajax()">发送Ajax请求</button>


    <script>
        // Access-Token
        function doOatuh2Ajax() {
            axios.get('http://www.laravel71202.cm/api/test001', {
                headers: {
                    'Authorization': 'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJhdWQiOiI0IiwianRpIjoiMDZkODAyMGZjM2FiN2Y5ZGYxN2Q5NTRlZGQ4ZWZjYzg4NzU5NzZlNjEwZjE1OWE1OGYyNDQxNTA1N2U1NjI5NDhlZTExMDc4YTYxNTQ1ZWIiLCJpYXQiOjE3NTM1OTE5NzAsIm5iZiI6MTc1MzU5MTk3MCwiZXhwIjoxNzU0ODg3OTY5LCJzdWIiOiIxIiwic2NvcGVzIjpbXX0.RFnHC5lFrKN-Va_fqyqMcMFgLhr6EfwwYBJwknjBINZPxL196q34vO1_yKyvrrU-uE8nZiofpBPh9TgG8FRbg0WNEfDkz3Aj42vXhscOduX9XjlrbM38AmwQtSIsfG_3SNAvwOmtAfd29YLXl_ET7hSUKukynMu64pd06SsW8hLNIJOdV9I89WIsGEgP8TP1KefIrJ-TpT0FgKUAa_hoEf9Y5uNXzSqUaOCWj2j3uw3Wet9ZiBnkYUsYzbYpw5t2HkKFQRbdVvxW29028SYlADFSGKdxX9whDKx0TWpfkTjtex0SCSglkcgAW2pHb2XfQW-sTabh3xVlRAEGv8lPYhmvn-bBBMO6RC3BCZ-B5CdoITyLE7zWkd1yNsywShllBmHrxYeAKCi-wavFr6tIERp-WjG63Mkb8AK-uXOL28ZwsZUiXcXhjRs359LNDx6XHlLdmMgtPE5CDufMHrCgf1ZDa4PqJLHi6ARFKOz3HraveT0p6bqLC8tZFW1q1xFDqE7x1-kVGLoFvdewsg490jjJkcibgakQqfmKlhvrePWaYcUPfmwYfh2H_f5Pui_psV0FwRxrFRPhoxXpJizNQulL-TIVzfGGFgSOL9lBFkcnE2u99_h6VDwRzvED40Ts5Z-MmbNoFZ4zLbCujZBj9YVzpanLzudhwEWkN8wZ4ZE'
                }
            })
                .then(response => {
                    console.log(response.data);
                })
                .catch (response => {
                    console.error(response);
                });
        }
    </script>
</body>
</html>